MODULE_NAME = hellomisc

obj-m += $(MODULE_NAME).o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
MAKE := make
default:
	$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
	rm -rf *.o *.ko *.mod.c *.symvers *.order .*.cmd *.mod

i: default uninstall
	sudo insmod $(MODULE_NAME).ko
	sudo chmod 777 /dev/$(MODULE_NAME)
u:
	sudo rmmod $(MODULE_NAME).ko